package com.cskaoyan.wordmemorize.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cskaoyan.wordmemorize.dao.entity.UserCheckinStatisticsDO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface UserCheckinStatisticsMapper extends BaseMapper<UserCheckinStatisticsDO> {


    @Select("SELECT user_id, total_days, max_continuous_days, cur_continuous_days, " +
            "max_continuous_start_date, cur_continuous_start_date, total_time"  +" " +
            "FROM user_checkin_statistics " +
            "WHERE user_id = #{userId}")
    UserCheckinStatisticsDO findByUserId(@Param("userId") Long userId);

}
